import pandas as pd
import numpy as np
#pandas中定义两个dataframe如下：
df1 = pd.DataFrame(np.arange(12.).reshape((3,4)),columns=list('abcd'))
df2 = pd.DataFrame(np.arange(20.).reshape((4,5)),columns=list('abcde'))
#df1 + df2
#Out[7]: 
#a     b     c     d   e
#0   0.0   2.0   4.0   6.0 NaN
#1   9.0  11.0  13.0  15.0 NaN
#2  18.0  20.0  22.0  24.0 NaN
#3   NaN   NaN   NaN   NaN NaN
#
#现在要把两个dataframe相加，得到如下结果，该怎么操作？
#a     b     c     d     e
#0   0.0   2.0   4.0   6.0   4.0
#1   9.0  11.0  13.0  15.0   9.0
#2  18.0  20.0  22.0  24.0  14.0
#3  15.0  16.0  17.0  18.0  19.0
print(df1.add(df2, fill_value = 0))
